<!DOCTYPE html>
<p>Cancelling a document.write()-inserted and blocking script shouldn't fail.</p>
<p>PASS if no crash.</p>
<script>
if (window.testRunner) {
    testRunner.dumpAsText();
    testRunner.setPopupBlockingEnabled(false);
    testRunner.waitUntilDone();
}
window.open("resources/document-write-then-close.html");
</script>
